Left Termination of the query pattern p_in_1(a) w.r.t. the given Prolog program could successfully be proven:



Prolog
  ↳ PrologToPiTRSProof

Clauses:

p(.(A, [])) :- l(.(A, [])).
r(1).
l([]).
l(.(H, T)) :- ','(r(H), l(T)).

Queries:

p(a).

We use the technique of [30]. With regard to the inferred argument filtering the predicates were used in the following modes:
p_in: (f)
l_in: (b)
Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

p_in_a(.(A, [])) → U1_a(A, l_in_g(.(A, [])))
l_in_g([]) → l_out_g([])
l_in_g(.(H, T)) → U2_g(H, T, r_in_a(H))
r_in_a(1) → r_out_a(1)
U2_g(H, T, r_out_a(H)) → U3_g(H, T, l_in_g(T))
U3_g(H, T, l_out_g(T)) → l_out_g(.(H, T))
U1_a(A, l_out_g(.(A, []))) → p_out_a(.(A, []))

The argument filtering Pi contains the following mapping:
p_in_a(x1)  =  p_in_a
U1_a(x1, x2)  =  U1_a(x2)
l_in_g(x1)  =  l_in_g(x1)
.(x1, x2)  =  .(x2)
[]  =  []
l_out_g(x1)  =  l_out_g
U2_g(x1, x2, x3)  =  U2_g(x2, x3)
r_in_a(x1)  =  r_in_a
r_out_a(x1)  =  r_out_a(x1)
U3_g(x1, x2, x3)  =  U3_g(x3)
p_out_a(x1)  =  p_out_a(x1)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog



↳ Prolog
  ↳ PrologToPiTRSProof
PiTRS
      ↳ DependencyPairsProof

Pi-finite rewrite system:
The TRS R consists of the following rules:

p_in_a(.(A, [])) → U1_a(A, l_in_g(.(A, [])))
l_in_g([]) → l_out_g([])
l_in_g(.(H, T)) → U2_g(H, T, r_in_a(H))
r_in_a(1) → r_out_a(1)
U2_g(H, T, r_out_a(H)) → U3_g(H, T, l_in_g(T))
U3_g(H, T, l_out_g(T)) → l_out_g(.(H, T))
U1_a(A, l_out_g(.(A, []))) → p_out_a(.(A, []))

The argument filtering Pi contains the following mapping:
p_in_a(x1)  =  p_in_a
U1_a(x1, x2)  =  U1_a(x2)
l_in_g(x1)  =  l_in_g(x1)
.(x1, x2)  =  .(x2)
[]  =  []
l_out_g(x1)  =  l_out_g
U2_g(x1, x2, x3)  =  U2_g(x2, x3)
r_in_a(x1)  =  r_in_a
r_out_a(x1)  =  r_out_a(x1)
U3_g(x1, x2, x3)  =  U3_g(x3)
p_out_a(x1)  =  p_out_a(x1)


Using Dependency Pairs [1,30] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:

P_IN_A(.(A, [])) → U1_A(A, l_in_g(.(A, [])))
P_IN_A(.(A, [])) → L_IN_G(.(A, []))
L_IN_G(.(H, T)) → U2_G(H, T, r_in_a(H))
L_IN_G(.(H, T)) → R_IN_A(H)
U2_G(H, T, r_out_a(H)) → U3_G(H, T, l_in_g(T))
U2_G(H, T, r_out_a(H)) → L_IN_G(T)

The TRS R consists of the following rules:

p_in_a(.(A, [])) → U1_a(A, l_in_g(.(A, [])))
l_in_g([]) → l_out_g([])
l_in_g(.(H, T)) → U2_g(H, T, r_in_a(H))
r_in_a(1) → r_out_a(1)
U2_g(H, T, r_out_a(H)) → U3_g(H, T, l_in_g(T))
U3_g(H, T, l_out_g(T)) → l_out_g(.(H, T))
U1_a(A, l_out_g(.(A, []))) → p_out_a(.(A, []))

The argument filtering Pi contains the following mapping:
p_in_a(x1)  =  p_in_a
U1_a(x1, x2)  =  U1_a(x2)
l_in_g(x1)  =  l_in_g(x1)
.(x1, x2)  =  .(x2)
[]  =  []
l_out_g(x1)  =  l_out_g
U2_g(x1, x2, x3)  =  U2_g(x2, x3)
r_in_a(x1)  =  r_in_a
r_out_a(x1)  =  r_out_a(x1)
U3_g(x1, x2, x3)  =  U3_g(x3)
p_out_a(x1)  =  p_out_a(x1)
R_IN_A(x1)  =  R_IN_A
U2_G(x1, x2, x3)  =  U2_G(x2, x3)
U1_A(x1, x2)  =  U1_A(x2)
L_IN_G(x1)  =  L_IN_G(x1)
P_IN_A(x1)  =  P_IN_A
U3_G(x1, x2, x3)  =  U3_G(x3)

We have to consider all (P,R,Pi)-chains

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
PiDP
          ↳ DependencyGraphProof

Pi DP problem:
The TRS P consists of the following rules:

P_IN_A(.(A, [])) → U1_A(A, l_in_g(.(A, [])))
P_IN_A(.(A, [])) → L_IN_G(.(A, []))
L_IN_G(.(H, T)) → U2_G(H, T, r_in_a(H))
L_IN_G(.(H, T)) → R_IN_A(H)
U2_G(H, T, r_out_a(H)) → U3_G(H, T, l_in_g(T))
U2_G(H, T, r_out_a(H)) → L_IN_G(T)

The TRS R consists of the following rules:

p_in_a(.(A, [])) → U1_a(A, l_in_g(.(A, [])))
l_in_g([]) → l_out_g([])
l_in_g(.(H, T)) → U2_g(H, T, r_in_a(H))
r_in_a(1) → r_out_a(1)
U2_g(H, T, r_out_a(H)) → U3_g(H, T, l_in_g(T))
U3_g(H, T, l_out_g(T)) → l_out_g(.(H, T))
U1_a(A, l_out_g(.(A, []))) → p_out_a(.(A, []))

The argument filtering Pi contains the following mapping:
p_in_a(x1)  =  p_in_a
U1_a(x1, x2)  =  U1_a(x2)
l_in_g(x1)  =  l_in_g(x1)
.(x1, x2)  =  .(x2)
[]  =  []
l_out_g(x1)  =  l_out_g
U2_g(x1, x2, x3)  =  U2_g(x2, x3)
r_in_a(x1)  =  r_in_a
r_out_a(x1)  =  r_out_a(x1)
U3_g(x1, x2, x3)  =  U3_g(x3)
p_out_a(x1)  =  p_out_a(x1)
R_IN_A(x1)  =  R_IN_A
U2_G(x1, x2, x3)  =  U2_G(x2, x3)
U1_A(x1, x2)  =  U1_A(x2)
L_IN_G(x1)  =  L_IN_G(x1)
P_IN_A(x1)  =  P_IN_A
U3_G(x1, x2, x3)  =  U3_G(x3)

We have to consider all (P,R,Pi)-chains
The approximation of the Dependency Graph [30] contains 1 SCC with 4 less nodes.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
PiDP
              ↳ UsableRulesProof

Pi DP problem:
The TRS P consists of the following rules:

L_IN_G(.(H, T)) → U2_G(H, T, r_in_a(H))
U2_G(H, T, r_out_a(H)) → L_IN_G(T)

The TRS R consists of the following rules:

p_in_a(.(A, [])) → U1_a(A, l_in_g(.(A, [])))
l_in_g([]) → l_out_g([])
l_in_g(.(H, T)) → U2_g(H, T, r_in_a(H))
r_in_a(1) → r_out_a(1)
U2_g(H, T, r_out_a(H)) → U3_g(H, T, l_in_g(T))
U3_g(H, T, l_out_g(T)) → l_out_g(.(H, T))
U1_a(A, l_out_g(.(A, []))) → p_out_a(.(A, []))

The argument filtering Pi contains the following mapping:
p_in_a(x1)  =  p_in_a
U1_a(x1, x2)  =  U1_a(x2)
l_in_g(x1)  =  l_in_g(x1)
.(x1, x2)  =  .(x2)
[]  =  []
l_out_g(x1)  =  l_out_g
U2_g(x1, x2, x3)  =  U2_g(x2, x3)
r_in_a(x1)  =  r_in_a
r_out_a(x1)  =  r_out_a(x1)
U3_g(x1, x2, x3)  =  U3_g(x3)
p_out_a(x1)  =  p_out_a(x1)
U2_G(x1, x2, x3)  =  U2_G(x2, x3)
L_IN_G(x1)  =  L_IN_G(x1)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ PiDP
              ↳ UsableRulesProof
PiDP
                  ↳ PiDPToQDPProof

Pi DP problem:
The TRS P consists of the following rules:

L_IN_G(.(H, T)) → U2_G(H, T, r_in_a(H))
U2_G(H, T, r_out_a(H)) → L_IN_G(T)

The TRS R consists of the following rules:

r_in_a(1) → r_out_a(1)

The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x2)
r_in_a(x1)  =  r_in_a
r_out_a(x1)  =  r_out_a(x1)
U2_G(x1, x2, x3)  =  U2_G(x2, x3)
L_IN_G(x1)  =  L_IN_G(x1)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ PiDP
              ↳ UsableRulesProof
                ↳ PiDP
                  ↳ PiDPToQDPProof
QDP
                      ↳ QDPSizeChangeProof

Q DP problem:
The TRS P consists of the following rules:

L_IN_G(.(T)) → U2_G(T, r_in_a)
U2_G(T, r_out_a(H)) → L_IN_G(T)

The TRS R consists of the following rules:

r_in_ar_out_a(1)

The set Q consists of the following terms:

r_in_a

We have to consider all (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs: